from django.db import models


# 设计我们的用户表
class User(models.Model):
    username = models.CharField('用户名', max_length=20)
    password = models.CharField('密码', max_length=80)
    phone = models.CharField('手机号', max_length=11)
    address = models.CharField('地址', max_length=120)
    email = models.EmailField('注册邮箱')
    status = models.SmallIntegerField(default=1)  # 1为未激活  2为激活  3为拉黑

    class Meta:
        db_table = "user"
        verbose_name = "用户"
        verbose_name_plural = verbose_name

    def __str__(self):
        return self.username
